package com.ruoyi.invoice.domain.vo;

import com.ruoyi.invoice.domain.TaxItem;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

import javax.validation.constraints.NotBlank;

/**
 * 销项发票视图对象 invoiceVO
 * 
 * @author XU
 * @date 2025-03-12
 */
public class InvoiceVO extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 序号 */
    private Long id;

    /** 发票号码 */
    @Excel(name = "发票号码")
    @NotBlank(message = "发票号码不能为空")
    private String invoiceNumber;

    /** 开票日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开票日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date invoiceDate;

    /** 发票类型 */
    @Excel(name = "发票类型")
    @NotBlank(message = "发票类型不能为空")
    private Long invoiceType;

    /** 发票代码 */
    @Excel(name = "发票代码")
    private String invoiceCode;

    /** 客户名称 */
    @Excel(name = "客户名称")
    @NotBlank(message = "客户名称不能为空")
    private String customerName;

    /** 地址、电话 */
    @Excel(name = "地址、电话")
    private String address;

    /** 开具方式 */
    private String issuingMethod;

    /** 项目 */
    private Long item;

    /** 纳税人识别号 */
    @Excel(name = "纳税人识别号")
    private String taxpayerIdentification;

    /** 开户行及账号 */
    @Excel(name = "开户行及账号")
    private String bankAndNumber;

    /** 是否作废 */
    @Excel(name = "是否作废")
    private Long voidOrNot;

    /** 模板名称 */
    @Excel(name = "模板名称")
    private Long templateName;

    /** 是否生成单据 */
    @Excel(name = "是否生成单据")
    private Long receipt;


    /** 上传附件 */
    private String uploadAttachment;


    /** 不含税金额 */
    @Excel(name = "合计金额")
    private BigDecimal amount;

    /** 价税合计 */
    @Excel(name = "税额")
    private BigDecimal taxAmount;

    /** 税率 */

    private String taxRate;

    public Long getTemplateName() {
        return templateName;
    }

    public void setTemplateName(Long templateName) {
        this.templateName = templateName;
    }

    public Long getReceipt() {
        return receipt;
    }

    public void setReceipt(Long receipt) {
        this.receipt = receipt;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getTaxAmount() {
        return taxAmount;
    }

    public void setTaxAmount(BigDecimal taxAmount) {
        this.taxAmount = taxAmount;
    }

    public String getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(String taxRate) {
        this.taxRate = taxRate;
    }

    /** 发票数据信息 */
    private List<TaxItem> taxItemList;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setInvoiceNumber(String invoiceNumber) {
        this.invoiceNumber = invoiceNumber;
    }

    public String getInvoiceNumber() {
        return invoiceNumber;
    }

    public void setInvoiceDate(Date invoiceDate) {
        this.invoiceDate = invoiceDate;
    }

    public Date getInvoiceDate() {
        return invoiceDate;
    }

    public void setInvoiceType(Long invoiceType) {
        this.invoiceType = invoiceType;
    }

    public Long getInvoiceType() {
        return invoiceType;
    }

    public void setInvoiceCode(String invoiceCode) {
        this.invoiceCode = invoiceCode;
    }

    public String getInvoiceCode() {
        return invoiceCode;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getAddress() {
        return address;
    }

    public void setIssuingMethod(String issuingMethod) {
        this.issuingMethod = issuingMethod;
    }

    public String getIssuingMethod() {
        return issuingMethod;
    }

    public void setItem(Long item) {
        this.item = item;
    }

    public Long getItem() {
        return item;
    }

    public void setTaxpayerIdentification(String taxpayerIdentification) {
        this.taxpayerIdentification = taxpayerIdentification;
    }

    public String getTaxpayerIdentification() {
        return taxpayerIdentification;
    }

    public void setBankAndNumber(String bankAndNumber) {
        this.bankAndNumber = bankAndNumber;
    }

    public String getBankAndNumber() {
        return bankAndNumber;
    }

    public void setVoidOrNot(Long voidOrNot) {
        this.voidOrNot = voidOrNot;
    }

    public Long getVoidOrNot() {
        return voidOrNot;
    }

    public void setUploadAttachment(String uploadAttachment) {
        this.uploadAttachment = uploadAttachment;
    }

    public String getUploadAttachment() {
        return uploadAttachment;
    }


    public List<TaxItem> getTaxItemList() {
        return taxItemList;
    }

    public void setTaxItemList(List<TaxItem> taxItemList) {
        this.taxItemList = taxItemList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("invoiceNumber", getInvoiceNumber())
                .append("invoiceDate", getInvoiceDate())
                .append("invoiceType", getInvoiceType())
                .append("invoiceCode", getInvoiceCode())
                .append("customerName", getCustomerName())
                .append("address", getAddress())
                .append("issuingMethod", getIssuingMethod())
                .append("item", getItem())
                .append("taxpayerIdentification", getTaxpayerIdentification())
                .append("bankAndNumber", getBankAndNumber())
                .append("voidOrNot", getVoidOrNot())
                .append("remark", getRemark())
                .append("uploadAttachment", getUploadAttachment())
                .append("taxItemList", getTaxItemList())
                .toString();
    }
}